package com.screenworker.compactmvc.examples.flex.modules.dummymodule.controller
{
	import com.screenworker.compactmvc.examples.flex.ApplicationController;
	import com.screenworker.compactmvc.examples.flex.model.ApplicationViewModel;
	import com.screenworker.compactmvc.examples.flex.modules.dummymodule.model.DummyModuleModel;
	import com.screenworker.compactmvc.examples.remoting.vo.ExampleServiceVO;
	import com.screenworker.compactmvc.interfaces.ICommand;
	import com.screenworker.compactmvc.patterns.Command;
	import com.screenworker.compactmvc.patterns.Controller;
	import com.screenworker.compactmvc.vo.NoteVO;

	public class RemotingResultCommand extends Command implements ICommand
	{
		public function RemotingResultCommand(controller:Controller)
		{
			super(controller);
		}
		
		override public function execute(note:NoteVO):void
		{
			var result:ExampleServiceVO = note.data as ExampleServiceVO;
			var model:DummyModuleModel = retrieveModel(DummyModuleModel.NAME) as DummyModuleModel;	
			
			model.remoteDescription = result.description;
			
		}
		
	}
}